# 1. 导入FastDFS客户端扩展
from fdfs_client.client import Fdfs_client
# 2. 创建FastDFS客户端实例
client = Fdfs_client('client.conf')
# 3. 调用FastDFS客户端上传文件方法
ret = client.upload_by_filename('/home/python/Desktop/kk.png')
print(ret)


#getting connection
# <fdfs_client.connection.Connection object at 0x7efc85b82d30>
# <fdfs_client.fdfs_protol.Tracker_header object at 0x7efc85b82cf8>
# {'Group name': 'group1',
# 'Remote file_id': 'group1/M00/00/00/wKgoo10sQMmAPdrdAA0MS5i1w-Q912.png',
# 'Status': 'Upload successed.',
# 'Local file name': '/home/python/Desktop/kk.png',
# 'Uploaded size': '835.00KB', 'Storage IP': '192.168.40.164'}
